package com.wxchat.chat.service;

import com.wxchat.chat.dao.Dao;

public class WebChatSerive {

	public  String  getSelect(String appid){
		String sql="SELECT * FROM  wechat WHERE OPENID=? ";
		Dao we=  new  Dao();
		return we.select(sql, new Object[]{appid});
	}
	/**
	 *修改的方法 
	 * */
	public static  Boolean  getUp(String appid,String account,String passwrod){
		String sql="UPDATE wechat SET OPENID=? WHERE account=? and password =?";
		Dao we=  new  Dao();
		return we.addOrUpdata(sql, new Object[]{appid,account,passwrod});
	}
	
	
//	public static void main(String[] args) {
//	boolean result = getUp("omuiDxFATXFBY-drhA2Srk0dCHF4","admin","admin");
//	System.out.println(result+"====");
//	}
}
